package com.mycode.chainOfResponsibility14.resolve;

// 副董事长类：具体处理者
public class VicePresident extends Approver {

    public VicePresident(String name) {
        super(name);
    }

    @Override
    public void processRequest(PurchaseRequest request) {
        // 处理请求
        if (request.getAmount() < 100000) {
            System.out.println(String.format("副董事长：%s 审批采购单：%s 金额：%s 元，采购目的：%s", this.name, request.getNumber(), request.getAmount(), request.getPurpose()));
        }else {
            this.successor.processRequest(request);
        }
    }
}
